package py.edu.ucom.cadira.game.event.war;

import org.jdom.Document;
import org.jdom.Element;

import py.edu.ucom.cadira.game.event.GameEvent;

/**
 * 
 * @author largonet
 *
 */
public class WarGameEvent extends GameEvent {
	private String type;
	
	public WarGameEvent(){
		this.type = "standart";
	}

	@Override
	public void fromXML(Document xml) {
		Element root = xml.getRootElement();
		Element warGameNode = root.getChild("warGameEvent");
		type = warGameNode.getAttributeValue("type");
	}

	@Override
	public void toXML(Element root) {
		Element warGameNode = new Element("warGameEvent");
		warGameNode.setAttribute("type",type);
		root.addContent(warGameNode);
	}
    
}

